Methods and systems for a non-disruptive planned failover from a primary copy of data at a primary storage system to a mirror copy of the data at a cross-site secondary storage system

ABSTRACT

Systems and methods are described for a non-disruptive planned failover from a primary copy of data at a primary storage system to a mirror copy of the data at a cross-site secondary storage system. According to an example, a planned failover feature of a multi-site distributed storage system provides an order of operations such that a primary copy of a first data center continues to serve I/O operations until a mirror copy of a second data center is ready. This planned failover feature improves functionality and efficiency of the distributed storage system by providing non-disruptiveness during planned failover—even if various failures occur. The planned failover feature also includes a persistent fence to avoid serving I/O operations during a timing window when both primary data storage and secondary data storage are attempting to have a master role to serve I/O operations and this avoids a split-brain situation.

COPYRIGHT NOTICE

Contained herein is material that is subject to copyright protection.The copyright owner has no objection to the facsimile reproduction ofthe patent disclosure by any person as it appears in the Patent andTrademark Office patent files or records, but otherwise reserves allrights to the copyright whatsoever. Copyright 2021, NetApp, Inc.

FIELD

Various embodiments of the present disclosure generally relate tomulti-site distributed data storage systems. In particular, someembodiments relate to improving system operation and user experiencebased on providing a non-disruptive planned failover from a primarystorage system to a secondary mirrored storage system.

BACKGROUND

Multiple storage nodes organized as a cluster may provide a distributedstorage architecture configured to service storage requests issued byone or more clients of the cluster. The storage requests are directed todata stored on storage devices coupled to one or more of the storagenodes of the cluster. The data served by the storage nodes may bedistributed across multiple storage units embodied as persistent storagedevices, such as hard disk drives (HDDs), solid state drives (SSDs),flash memory systems, or other storage devices. The storage nodes maylogically organize the data stored on the devices as volumes accessibleas logical units. Each volume may be implemented as a set of datastructures, such as data blocks that store data for the volume andmetadata blocks that describe the data of the volume.

Business enterprises rely on multiple clusters for storing andretrieving data. Each cluster may be a separate data center with theclusters able to communicate over an unreliable network. The network canbe prone to failures leading to connectivity issues such as transient orpersistent connectivity issues that disrupt operations of a businessenterprise.

SUMMARY

Systems and methods are described for a non-disruptive planned failoverfrom a primary copy of data at a primary storage system to a mirror copyof the data at a cross-site secondary storage system. According to anexample, a planned failover feature of a multi-site distributed storagesystem provides an order of operations such that a primary copy of afirst data center continues to serve I/O operations until a mirror copyof a second data center is ready. This planned failover feature improvesfunctionality and efficiency of the multi-site distributed storagesystem by providing non-disruptiveness during planned failover—inpresence of various failures. The planned failover feature uses acombination of persistent fence and strong quorum consensus to avoidsplit-brain during a timing window where both primary and secondary datastorage are attempting to have a master role to serve I/O operations.

Other features of embodiments of the present disclosure will be apparentfrom accompanying drawings and detailed description that follows.

BRIEF DESCRIPTION OF THE DRAWINGS

In the Figures, similar components and/or features may have the samereference label. Further, various components of the same type may bedistinguished by following the reference label with a second label thatdistinguishes among the similar components. If only the first referencelabel is used in the specification, the description is applicable to anyone of the similar components having the same first reference labelirrespective of the second reference label.

FIG. 1 is a block diagram illustrating an environment in which variousembodiments may be implemented.

FIG. 2 is a block diagram illustrating an environment having potentialfailures within a multi-site distributed storage system in which variousembodiments may be implemented.

FIG. 3 is a block diagram of a multi-site distributed storage systemaccording to various embodiments of the present disclosure.

FIG. 4 is a block diagram illustrating a storage node in accordance withan embodiment of the present disclosure.

FIG. 5 is a block diagram illustrating the concept of a consistencygroup (CG) in accordance with an embodiment.

FIG. 6 is a flow diagram illustrating a computer-implemented method 500of operations for a planned failover feature that providesnon-disruptiveness in presence of failures in accordance with anembodiment of the present disclosure.

FIG. 7 is a flow diagram illustrating a computer-implemented method 600of operations for an atomic test and set procedure of a planned failoverfeature in accordance with an embodiment of the present disclosure.

FIG. 8 is a block diagram of a multi-site distributed storage system 700that performs a planned failover feature in accordance with anembodiment of the present disclosure.

FIG. 9 illustrates an example computer system in which or with whichembodiments of the present disclosure may be utilized.

DETAILED DESCRIPTION

Multi-site distributed storage systems and computer-implemented methodsare described for providing a planned failover feature to guaranteenon-disruptive operations (e.g., operations of business enterpriseapplications, operations of software application) even in the presenceof failures including, but not limited to, network disconnection betweenmultiple data centers and failures of a data center or cluster. An orderof operations performed by a planned failover includes a timing windowwhere both a primary copy of a first data center and a mirror copy of asecond data center are designated with a role of a master and thereforeare capable of serving input/output (I/O) operations (e.g., I/Ocommands) to an application independently. However, if multiple datacenters are simultaneous allowed to serve I/O operations, then thiscause a split-brain situation and results in data consistency issues.

This planned failover feature of a multi-site distributed storage systemprovides an order of operations such that a primary copy of a first datacenter continues to serve I/O operations until a mirror copy of a seconddata center is ready. This planned failover feature improvesfunctionality and efficiency of the multi-site distributed storagesystem by providing non-disruptiveness during planned failover—inpresence of various failures. The planned failover feature also includesa persistent fence to avoid serving I/O operations during a timingwindow when both primary data storage and secondary data storage areattempting to have a master role to serve I/O operations and this avoidsa split-brain situation. A strong consensus can be determined evenduring the presence of multiple failures. The multi-site distributedstorage system upon obtaining a new consensus, will persistently cachethis consensus in a second cluster of a second data center. In oneexample, after obtaining a positive consensus that is cached, a secondcluster reboots and after the second cluster is operational,connectivity to the mediator is lost (either transient or persistent).This caching of the consensus provides non-disruptiveness in a doublefailure scenario where the second cluster performs a reboot andmeanwhile the connectivity to the mediator fails in a transient orpermanent manner Operations of business enterprises and softwareapplications that utilize a multi-site distributed storage system areimproved due to being able to continuously access that distributedstorage system even in the presence of multiple failures within thedistributed storage system or failures between components of thedistributed storage system.

A current approach that has more disruption and down time due to one ormore failures within a storage system or between storage systems will beless efficient in serving I/O operations due to the disruption ofoperations including serving I/O operations. The current approach willnot be able to determine a consensus for serving I/O operations if aconnection from a data center to a mediator is lost or disrupted. Inthis case, a primary storage and secondary mirror storage may bothattempt to obtain consensus and both attempt to serve I/O operationssimultaneously, which will reduce the distributed storage systemefficiency and congest network connections to clients with redundantresponses to I/O operations.

Other current approaches provide local high availability protection withnon-disruptive operations in the event of a single controller failure.In one embodiment, cross-site high availability is a valuable additionto cross-site zero recover point objective (RPO) that providesnon-disruptive operations even if an entire local data center becomesnon-functional based on a seamless failing over of storage access to amirror copy hosted in a remote data center. This type of failover isalso known as zero RTO, near zero RTO, or automatic failover. Across-site high availability storage when deployed with host clusteringenables workloads to be in both data centers.

A planned failover of storage access from a primary copy of the datasetto a cross-site mirror copy is desired due to business processrequirements to prove that the mirror copy actually works in case of areal disaster and also as a general practice to periodically switch theprimary and mirror data centers.

A planned failover is desired for a distributed high availabilitystorage system. The planned failover can also be used for non-disruptivemigration of workloads in a planned fashion. Given that more workloadsare moving to a cloud environment and many customers deploy hybridcloud, applications will also demand these same features in the cloudincluding cross-site high availability, planned failover, plannedmigration, etc.

As such, embodiments described herein seek to improve the technologicalprocesses of multi-site distributed data storage systems. Variousembodiments of the present technology provide for a wide range oftechnical effects, advantages, and/or improvements to multi-sitedistributed storage systems and components. For example, variousembodiments may include one or more of the following technical effects,advantages, and/or improvements: (i) order of operations of a plannedfailover operation such that a primary copy of storage continues toserve I/O operations until a mirror copy is ready; (ii) guaranteenon-disruptiveness during planned failover—in presence of variousfailures; (iii) persistently caching a consensus to avoid disruptioneven when connectivity to a mediator is disrupted; (iv) engagingfilesystem persistent fence to reduce complexity of overall solutionwhen dealing with controller reboots during planned failover; and (v)avoidance of split-brain by the way of a strong consensus in a Paxosinstance that covers primary copy of a consistency group (CG), mirrorcopy of CG, and the mediator.

In the following description, numerous specific details are set forth inorder to provide a thorough understanding of embodiments of the presentdisclosure. It will be apparent, however, to one skilled in the art thatembodiments of the present disclosure may be practiced without some ofthese specific details. In other instances, well-known structures anddevices are shown in block diagram form.

Terminology

Brief definitions of terms used throughout this application are givenbelow.

A “computer” or “computer system” may be one or more physical computers,virtual computers, or computing devices. As an example, a computer maybe one or more server computers, cloud-based computers, cloud-basedcluster of computers, virtual machine instances or virtual machinecomputing elements such as virtual processors, storage and memory, datacenters, storage devices, desktop computers, laptop computers, mobiledevices, or any other special-purpose computing devices. Any referenceto “a computer” or “a computer system” herein may mean one or morecomputers, unless expressly stated otherwise.

The terms “connected” or “coupled” and related terms are used in anoperational sense and are not necessarily limited to a direct connectionor coupling. Thus, for example, two devices may be coupled directly, orvia one or more intermediary media or devices. As another example,devices may be coupled in such a way that information can be passedthere between, while not sharing any physical connection with oneanother. Based on the disclosure provided herein, one of ordinary skillin the art will appreciate a variety of ways in which connection orcoupling exists in accordance with the aforementioned definition.

If the specification states a component or feature “may”, “can”,“could”, or “might” be included or have a characteristic, thatparticular component or feature is not required to be included or havethe characteristic.

As used in the description herein and throughout the claims that follow,the meaning of “a,” “an,” and “the” includes plural reference unless thecontext clearly dictates otherwise. Also, as used in the descriptionherein, the meaning of “in” includes “in” and “on” unless the contextclearly dictates otherwise.

The phrases “in an embodiment,” “according to one embodiment,” and thelike generally mean the particular feature, structure, or characteristicfollowing the phrase is included in at least one embodiment of thepresent disclosure, and may be included in more than one embodiment ofthe present disclosure. Importantly, such phrases do not necessarilyrefer to the same embodiment.

Example Operating Environment

FIG. 1 is a block diagram illustrating an environment 100 in whichvarious embodiments may be implemented. In various examples describedherein, an administrator (e.g., user 112) of a multi-site distributedstorage system 102 having clusters 135 and cluster 145 or a managedservice provider responsible for multiple distributed storage systems ofthe same or multiple customers may monitor various operations andnetwork conditions of the distributed storage system or multipledistributed storage systems via a browser-based interface presented oncomputer system 110.

In the context of the present example, the multi-site distributedstorage system 102 includes a data center 130, a data center 140, andoptionally a mediator 120. The data centers 130 and 140, the mediator120, and the computer system 110 are coupled in communication via anetwork 105, which, depending upon the particular implementation, may bea Local Area Network (LAN), a Wide Area Network (WAN), or the Internet.

The data centers 130 and 140 may represent an enterprise data center(e.g., an on-premises customer data center) that is owned and operatedby a company or the data center 130 may be managed by a third party (ora managed service provider) on behalf of the company, which may leasethe equipment and infrastructure. Alternatively, the data centers 130and 140 may represent a colocation data center in which a company rentsspace of a facility owned by others and located off the companypremises. The data centers are shown with a cluster (e.g., cluster 135,cluster 145). Those of ordinary skill in the art will appreciateadditional IT infrastructure may be included within the data centers 130and 140. In one example, the data center 140 is a mirrored copy of thedata center 130 to provide non-disruptive operations at all times evenin the presence of failures including, but not limited to, networkdisconnection between the data centers 130 and 140 and the mediator 120,which can also be located at a data center.

Turning now to the cluster 135, it includes multiple storage nodes 136a-n and an Application Programming Interface (API) 137. In the contextof the present example, the multiple storage nodes 136 a-n are organizedas a cluster and provide a distributed storage architecture to servicestorage requests issued by one or more clients (not shown) of thecluster. The data served by the storage nodes 136 a-n may be distributedacross multiple storage units embodied as persistent storage devices,including but not limited to HDDs, SSDs, flash memory systems, or otherstorage devices. In a similar manner, cluster 145 includes multiplestorage nodes 146 a-n and an Application Programming Interface (API)147. In the context of the present example, the multiple storage nodes146 a-n are organized as a cluster and provide a distributed storagearchitecture to service storage requests issued by one or more clientsof the cluster.

The API 137 may provide an interface through which the cluster 135 isconfigured and/or queried by external actors (e.g., the computer system110, data center 140, the mediator 120, clients). Depending upon theparticular implementation, the API 137 may represent a RepresentationalState Transfer (REST)ful API that uses Hypertext Transfer Protocol(HTTP) methods (e.g., GET, POST, PATCH, DELETE, and OPTIONS) to indicateits actions. Depending upon the particular embodiment, the API 137 mayprovide access to various telemetry data (e.g., performance,configuration, storage efficiency metrics, and other system data)relating to the cluster 135 or components thereof. As those skilled inthe art will appreciate various other types of telemetry data may bemade available via the API 137, including, but not limited to measuresof latency, utilization, and/or performance at various levels (e.g., thecluster level, the storage node level, or the storage node componentlevel).

In the context of the present example, the mediator 120, which mayrepresent a private or public cloud accessible (e.g., via a web portal)to an administrator associated with a managed service provider and/oradministrators of one or more customers of the managed service provider,includes a cloud-based, monitoring system.

While for sake of brevity, only two data centers are shown in thecontext of the present example, it is to be appreciated that additionalclusters owned by or leased by the same or different companies (datastorage subscribers/customers) may be monitored and one or more metricsmay be estimated based on data stored within a given level of a datastore in accordance with the methodologies described herein and suchclusters may reside in multiple data centers of different types (e.g.,enterprise data centers, managed services data centers, or colocationdata centers).

FIG. 2 is a block diagram illustrating an environment 200 havingpotential failures within a multi-site distributed storage system 202 inwhich various embodiments may be implemented. In various examplesdescribed herein, an administrator (e.g., user 212) of a multi-sitedistributed storage system 202 having clusters 235 and cluster 245 or amanaged service provider responsible for multiple distributed storagesystems of the same or multiple customers may monitor various operationsand network conditions of the distributed storage system or multipledistributed storage systems via a browser-based interface presented oncomputer system 210.

In the context of the present example, the system 202 includes datacenter 230, data center 240, and optionally a mediator 220. The datacenters 230 and 240, the mediator 220, and the computer system 210 arecoupled in communication via a network 205, which, depending upon theparticular implementation, may be a Local Area Network (LAN), a WideArea Network (WAN), or the Internet.

The data centers 230 and 240 may represent an enterprise data center(e.g., an on-premises customer data center) that is owned and operatedby a company or the data center 230 may be managed by a third party (ora managed service provider) on behalf of the company, which may leasethe equipment and infrastructure. Alternatively, the data centers 230and 240 may represent a colocation data center in which a company rentsspace of a facility owned by others and located off the companypremises. The data centers are shown with a cluster (e.g., cluster 235,cluster 245). Those of ordinary skill in the art will appreciateadditional IT infrastructure may be included within the data centers 230and 240. In one example, the data center 240 is a mirrored copy of thedata center 230 to provide non-disruptive operations at all times evenin the presence of failures including, but not limited to, networkdisconnection between the data centers 230 and 240 and the mediator 220,which can also be a data center.

The system 202 can utilize communications 290 and 291 to synchronize amirrored copy of data of the data center 240 with a primary copy of thedata of the data center 230. Either of the communications 290 and 291between the data centers 230 and 240 may have a failure 295. In asimilar manner, a communication 292 between data center 230 and mediator220 may have a failure 296 while a communication 293 between the datacenter 240 and the mediator 220 may have a failure 297. If not respondedto appropriately, these failures whether transient or permanent have thepotential to disrupt operations for users of the distributed storagesystem 202. In one example, communications between the data centers 230and 240 have approximately a 5-20 millisecond round trip time.

Turning now to the cluster 235, it includes at least two storage nodes236 a-b, optionally includes additional storage nodes (e.g., 236 n) andan Application Programming Interface (API) 237. In the context of thepresent example, the multiple storage nodes are organized as a clusterand provide a distributed storage architecture to service storagerequests issued by one or more clients of the cluster. The data servedby the storage nodes may be distributed across multiple storage unitsembodied as persistent storage devices, including but not limited toHDDs, SSDs, flash memory systems, or other storage devices.

Turning now to the cluster 245, it includes at least two storage nodes246 a-b, optionally includes additional storage nodes (e.g., 246 n) andincludes an Application Programming Interface (API) 247. In the contextof the present example, the multiple storage nodes are organized as acluster and provide a distributed storage architecture to servicestorage requests issued by one or more clients of the cluster. The dataserved by the storage nodes may be distributed across multiple storageunits embodied as persistent storage devices, including but not limitedto HDDs, SSDs, flash memory systems, or other storage devices.

In one example, each cluster can have up to 5 consistency groups witheach consistency group having up to 12 volumes. The system 202 providesa planned failover feature at a consistency group granularity. Theplanned failover feature allows switching storage access from a primarycopy of the data center 230 to a mirror copy of the data center 240 orvice versa.

FIG. 3 is a block diagram illustrating a multi-site distributed storagesystem 300 in which various embodiments may be implemented. In variousexamples described herein, an administrator (e.g., user 312) of themulti-site distributed storage system 300 or a managed service providerresponsible for multiple distributed storage systems of the same ormultiple customers may monitor various operations and network conditionsof the distributed storage system or multiple distributed storagesystems via a browser-based interface presented on computer system 310.In the context of the present example, the distributed storage system300 includes a data center 302 having a cluster 310, a data center 304having a cluster 320, and a mediator 360. The clusters 310, 320, and themediator 360 are coupled in communication (e.g., communications 340-342)via a network, which, depending upon the particular implementation, maybe a Local Area Network (LAN), a Wide Area Network (WAN), or theInternet.

The cluster 310 includes nodes 311 and 312 while the cluster 320includes nodes 321 and 322. In one example, the cluster 320 has a datacopy 331 that is a mirrored copy of the data copy 330 to providenon-disruptive operations at all times even in the presence of failuresincluding, but not limited to, network disconnection between the datacenters 302 and 304 and the mediator 360.

The multi-site distributed storage system 300 provides correctness ofdata, availability, and redundancy of data. In one example, the node 311is designated as a master and the node 321 is designated as a slave. Themaster is given preference to serve I/O operations to requesting clientsand this allows the master to obtain a consensus in a case of a racebetween the clusters 310 and 320. The mediator 360 enables an automatedunplanned failover (AUFO) in the event of a failure. The data copy 330(master), data copy 331 (slave), and the mediator 360 form a three wayquorum. If two of the three entities reach an agreement for whether themaster or slave should serve I/O operations to requesting clients, thenthis forms a strong consensus.

The master and slave roles for the clusters 310 and 320 help to avoid asplit-brain situation with both of the clusters simultaneouslyattempting to serve I/O operations. There are scenarios where bothmaster and slave copies can claim to be a master copy. For example, arecovery post failover or failure during planned failover workflow canresults in both clusters 310 and 320 attempting to serve I/O operations.In one example, a slave cannot serve I/O until an AUFO happens. A masterdoesn't serve I/O operations until the master obtains a consensus.

The multi-site distributed storage system 300 presents a single virtuallogical unit number (LUN) to a host computer or client using asynchronized-replicated distributed copies of a LUN. A LUN is a uniqueidentifier for designating an individual or collection of physical orvirtual storage devices that execute input/output (I/O) commands with ahost computer, as defined by the Small System Computer Interface (SCSI)standard. In one example, active or passive access to this virtual LUNcauses read and write commands to be serviced only by node 311 (master)while operations received by the node 321 (slave) are proxied to node311.

Example Storage Node

FIG. 4 is a block diagram illustrating a storage node 400 in accordancewith an embodiment of the present disclosure. Storage node 400represents a non-limiting example of storage nodes (e.g., 136 a-n, 146a-n, 236 a-n, 246 a-n, 311, 312, 331, 322, 712, 714, 752, 754) describedherein. In the context of the present example, a storage node 400 may bea network storage controller or controller that provides access to datastored on one or more volumes. The storage node 400 includes a storageoperating system 410, one or more slice services 420 a-n, and one ormore block services 415 a-q. The storage operating system (OS) 410 mayprovide access to data stored by the storage node 400 via variousprotocols (e.g., small computer system interface (SCSI), Internet smallcomputer system interface (ISCSI), fibre channel (FC), common Internetfile system (CIFS), network file system (NFS), hypertext transferprotocol (HTTP), web-based distributed authoring and versioning(WebDAV), or a custom protocol. A non-limiting example of the storage OS410 is NetApp Element Software (e.g., the SolidFire Element OS) based onLinux and designed for SSDs and scale-out architecture with the abilityto expand up to 100 storage nodes.

Each slice service 420 may include one or more volumes (e.g., volumes421 a-x, volumes 421 c-y, and volumes 421 e-z). Client systems (notshown) associated with an enterprise may store data to one or morevolumes, retrieve data from one or more volumes, and/or modify datastored on one or more volumes.

The slice services 420 a-n and/or the client system may break data intodata blocks. Block services 415 a-q and slice services 420 a-n maymaintain mappings between an address of the client system and theeventual physical location of the data block in respective storage mediaof the storage node 400. In one embodiment, volumes 421 include uniqueand uniformly random identifiers to facilitate even distribution of avolume's data throughout a cluster (e.g., cluster 135). The sliceservices 420 a-n may store metadata that maps between client systems andblock services 415. For example, slice services 420 may map between theclient addressing used by the client systems (e.g., file names, objectnames, block numbers, etc. such as Logical Block Addresses (LBAs)) andblock layer addressing (e.g., block IDs) used in block services 415.Further, block services 415 may map between the block layer addressing(e.g., block identifiers) and the physical location of the data block onone or more storage devices. The blocks may be organized within binsmaintained by the block services 415 for storage on physical storagedevices (e.g., SSDs).

As noted above, a bin may be derived from the block ID for storage of acorresponding data block by extracting a predefined number of bits fromthe block identifiers. In some embodiments, the bin may be divided intobuckets or “sublists” by extending the predefined number of bitsextracted from the block identifier. A bin identifier may be used toidentify a bin within the system. The bin identifier may also be used toidentify a particular block service 415 a-q and associated storagedevice (e.g., SSD). A sublist identifier may identify a sublist with thebin, which may be used to facilitate network transfer (or syncing) ofdata among block services in the event of a failure or crash of thestorage node 400. Accordingly, a client can access data using a clientaddress, which is eventually translated into the corresponding uniqueidentifiers that reference the client's data at the storage node 400.

For each volume 421 hosted by a slice service 420, a list of block IDsmay be stored with one block ID for each logical block on the volume.Each volume may be replicated between one or more slice services 420and/or storage nodes 400, and the slice services for each volume may besynchronized between each of the slice services hosting that volume.Accordingly, failover protection may be provided in case a slice service420 fails, such that access to each volume may continue during thefailure condition.

FIG. 5 is a block diagram illustrating the concept of a consistencygroup (CG) in accordance with an embodiment. In the context of thepresent example, a stretch cluster including two clusters (e.g., cluster510 a and 510 b) is shown. The clusters may be part of a cross-sitehigh-availability (HA) solution that supports zero recovery pointobjective (RPO) and zero recovery time objective (RTO) by, among otherthings, providing a mirror copy of a dataset at a remote location, whichis typically in a different fault domain than the location at which thedataset is hosted. For example, cluster 510 a may be operable within afirst site (e.g., a local data center) and cluster 510 b may be operablewithin a second site (e.g., a remote data center) so as to providenon-disruptive operations even if, for example, an entire data centerbecomes non-functional, by seamlessly failing over the storage access tothe mirror copy hosted in the other data center.

According to some embodiments, various operations (e.g., datareplication, data migration, data protection, failover, and the like)may be performed at the level of granularity of a CG (e.g., CG 515 a orCG 515 b). A CG is a collection of storage objects or data containers(e.g., volumes) within a cluster that are managed by a Storage VirtualMachine (e.g., SVM 511 a or SVM 511 b) as a single unit. In variousembodiments, the use of a CG as a unit of data replication guarantees adependent write-order consistent view of the dataset and the mirror copyto support zero RPO and zero RTO. CGs may also be configured for use inconnection with taking simultaneous snapshot images of multiple volumes,for example, to provide crash-consistent copies of a dataset associatedwith the volumes at a particular point in time. The level of granularityof operations supported by a CG is useful for various types ofapplications. As a non-limiting example, consider an application, suchas a database application, that makes use of multiple volumes, includingmaintaining logs on one volume and the database on another volume.

The volumes of a CG may span multiple disks (e.g., electromechanicaldisks and/or SSDs) of one or more storage nodes of the cluster. A CG mayinclude a subset or all volumes of one or more storage nodes. In oneexample, a CG includes a subset of volumes of a first storage node and asubset of volumes of a second storage node. In another example, a CGincludes a subset of volumes of a first storage node, a subset ofvolumes of a second storage node, and a subset of volumes of a thirdstorage node. A CG may be referred to as a local CG or a remote CGdepending upon the perspective of a particular cluster. For example, CG515 a may be referred to as a local CG from the perspective of cluster510 a and as a remote CG from the perspective of cluster 510 b.Similarly, CG 515 a may be referred to as a remote CG from theperspective of cluster 510 b and as a local CG from the perspective ofcluster 510 b. At times, the volumes of a CG may be collectivelyreferred to herein as members of the CG and may be individually referredto as a member of the CG. In one embodiment, members may be added orremoved from a CG after it has been created.

A cluster may include one or more SVMs, each of which may contain datavolumes and one or more logical interfaces (LIFs) (not shown) throughwhich they serve data to clients. SVMs may be used to securely isolatethe shared virtualized data storage of the storage nodes in the cluster,for example, to create isolated partitions within the cluster. In oneembodiment, an LIF includes an Internet Protocol (IP) address and itsassociated characteristics. Each SVM may have a separate administratorauthentication domain and can be managed independently via a managementLIF to allow, among other things, definition and configuration of theassociated CGs.

In the context of the present example, the SVMs make use of aconfiguration database (e.g., replicated database (RDB) 512 a and 512b), which may store configuration information for their respectiveclusters. A configuration database provides cluster wide storage forstorage nodes within a cluster. The configuration information mayinclude relationship information specifying the status, direction ofdata replication, relationships, and/or roles of individual CGs, a setof CGs, members of the CGs, and/or the mediator. A pair of CGs may besaid to be “peered” when one is protecting the other. For example, a CG(e.g., CG 115 b) to which data is configured to be synchronouslyreplicated may be referred to as being in the role of a destination CG,whereas the CG (e.g., CG 515 a) being protected by the destination CGmay be referred to as the source CG. Various events (e.g., transient orpersistent network connectivity issues, availability/unavailability ofthe mediator, site failure, and the like) impacting the stretch clustermay result in the relationship information being updated at the clusterand/or the CG level to reflect changed status, relationships, and/orroles.

While in the context of various embodiments described herein, a volumeof a consistency group may be described as performing certain actions(e.g., taking other members of a consistency group out ofsynchronization, disallowing/allowing access to the dataset or themirror copy, issuing consensus protocol requests, etc.), it is to beunderstood such references are shorthand for an SVM or other controllingentity, managing or containing the volume at issue, performing suchactions on behalf of the volume.

While in the context of various examples described herein, datareplication may be described as being performed in a synchronous mannerbetween a paired set of CGs associated with different clusters (e.g.,from a primary or master cluster to a secondary or slave cluster), datareplication may also be performed asynchronously and/or within the samecluster. Similarly, a single remote CG may protect multiple local CGsand/or multiple remote CGs may protect a single local CG. In addition,those skilled in the art will appreciate a cross-site high-availability(HA) solution may include more than two clusters, in which a mirroredcopy of a dataset of a primary (master) cluster is stored on more thanone secondary (slave) cluster.

FIG. 6 is a flow diagram illustrating a computer-implemented method 600of operations for a planned failover feature that providesnon-disruptiveness in presence of failures in accordance with anembodiment of the present disclosure. As noted above, this plannedfailover feature of the present design provides an order of operationssuch that a primary copy of a first data center continues to serve I/Ooperations until a mirror copy of a second data center is ready. Thisplanned failover feature provides non-disruptiveness during plannedfailover—in presence of various failures. The planned failover featurealso avoids a split-brain situation by the way of a strong consensus(e.g., strong consensus in a PAXOS instance) based on having a primarycopy of a first data center, a mirror copy with a second data center,and a mediator at a third site.

Although the operations in the computer-implemented method 600 are shownin a particular order, the order of the actions can be modified. Thus,the illustrated embodiments can be performed in a different order, andsome operations may be performed in parallel. Some of the operationslisted in FIG. 6 are optional in accordance with certain embodiments.The numbering of the operations presented is for the sake of clarity andis not intended to prescribe an order of operations in which the variousoperations must occur. Additionally, operations from the various flowsmay be utilized in a variety of combinations.

The operations of computer-implemented method 600 may be executed by astorage controller, a storage virtual machine (e.g., SVM 511 a, SVM 511b), a mediator (e.g., mediator 120, mediator 220, mediator 360), amulti-site distributed storage system, a computer system, a machine, aserver, a web appliance, a centralized system, a distributed node, orany system, which includes processing logic (e.g., one or moreprocessors, a processing resource). The processing logic may includehardware (circuitry, dedicated logic, etc.), software (such as is run ona general purpose computer system or a dedicated machine or a device),or a combination of both.

In one embodiment, a multi-site distributed storage system includes afirst cluster having a primary copy of data in a consistency group(CG1). The consistency group of the first cluster is assigned a masterrole. A second cluster has a mirror copy of the data of the primary copyin the consistency group. The consistency group of the second cluster(CG2) is assigned a slave role.

At operation 610, a multi-site distributed storage system having thefirst and second clusters receives a failover start command and thisinitializes a starting state of a planned failover (PFO) feature. Atoperation 612, prechecks are performed by the multi-site distributedstorage system to determine whether a planned failover is incompatiblewith other operations. For example, a move operation for a volume wouldneed to be allowed to complete before the planned failover proceeds. Atoperation 614, the multi-site distributed storage system (e.g., firstcluster) starts a rollback timer. Expiration of this timer causes afence (e.g., persistent fence at operation 620) to drop and allow I/Ooperations locally on the first cluster. This rollback timer providesnon-disruptiveness from the consistency group of the first clusterbefore a role change operation (e.g., role change operation 624). Anyfailure that results in failing the planned failover operation, such asnetwork connectivity issues or slowness leading to timeout issues, willprevent the role change operation. In that case, the rollback timer atthe consistency group of the first cluster (CG1) will pre-empt the rolechange operation and allow I/O operations locally at CG1 therebyguaranteeing non-disruptiveness. This timer also enables making plannedfailover operation a time-bound operation by the way of setting thetimer to a user defined value. If the steps leading to the role changeoperation take longer than the timeout, I/O commands will resume basedon the timer expiry.

At operation 616, the computer-implemented method includes rejecting I/Ooperations at the first cluster. At operation 618, thecomputer-implemented method includes draining inflight operations at thefirst cluster to ensure that both primary and mirror copies of CG1 andCG2 have consistent data. At operation 619, volumes of nodes of CG2 arechanged from a read only state to a readable and writeable state. Also,at operation 619, the computer-implemented method converts CG2 from aslave role to a master role.

At operation 620, the computer-implemented method includes setting apersistent fence to prevent new I/O operations from being processed bythe multi-site distributed storage system or the second cluster. Afilesystem persistent fence for data storage management software is usedto implement this. Once activated, the fence is persistent and thereforehandles any failures including a controller reboot for a controller of acluster. Also, as a part of this operation, the CG1 initially having themaster role releases a consensus that CG1 previously had—carry forwardfrom steady state. Releasing the consensus from CG1 allows the CG2 toacquire a consensus as part of a subsequent role change operation 624(e.g., cutover operation, point of no return operation).

At operation 622, the computer-implemented method includes notifying ahost of paths to CG2 as active/optimized and this will enable the hostto start sending I/O operations to the mirrored copy of CG2.

At operation 624, the computer-implemented method includes a role changeoperation to change a role for CG2 in an atomic test and set procedure,which is described and illustrated in FIG. 7. The atomic test involveschecking whether a relationship state between primary and mirror copiesis already synchronized (e.g., a mirror copy (slave) is failovercapable) or not at operation 626. If a relationship state issynchronized (e.g., in sync state), then the mirror copy (slave) will befailover capable. At operation 628, the setting to change owner of thisconsistency group to CG2 (master) only occurs when atomic testdetermines that the relationship is synchronized. A change of ownershipis stored as a database update with a mediator. If the atomic test failswith relationship state not in sync state and thus a planned failoverfails, then no change occurs in owner of the consistency group atoperation 629. In a normal case, the second cluster checks that therelationship is still synchronized and then in an atomic fashion changesthe owner for this CG to CG2.

At operation 630, the computer-implemented method includes a newconsensus being persistently cached by CG2. This caching providesnon-disruptiveness in a double failure scenario where the second clusterperforms a reboot and meanwhile the connectivity to the mediator failsin a transient or permanent manner Upon reboot, CG2 uses the persistentcached consensus to allow I/O operations. This cache also allows fornon-disruptiveness, for a case where before role change operation 624,CG1 loses connectivity to the mediator and the rollback timer expires.The multi-site distributed storage system allows a master to acquireconsensus directly from CG2 over an inter cluster link. Before the rolechange operation 624, a consensus request over inter cluster will failplanned failover and mark CG2 failover-incapable (implicit consensus toCG1). After role change operation 624, a consensus request over theinter cluster communication link is rejected via the persistently cachedoutcome of the operation 524.

A race between the CG1 and CG2 is handled via a tiebreaker mediatoragent that serializes local as well as requests from across the othercluster and provides a first come first serve guarantee.

The planned failover feature avoids a split-brain situation by way of astrong consensus in a three party quorum including CG1, CG2, and theMediator. Planned failover defines a role change operation, which can bethought of as a cutover for Host I/O from a primary copy to a mirrorcopy. The role change operation is implemented as a strong consensus ina three party quorum. CG1 and CG2 can request for a consensus andMediator implements an atomic test and set procedure to grant aconsensus.

In one example, CG1, CG2 and Mediator in a quorum can be thought of aspart of Paxos group and strong consensus as a Paxos consensus. Paxos isa family of protocols for solving consensus in a network of unreliableor fallible processors. Consensus is the process of agreeing on oneresult among a group of participants. This problem becomes difficultwhen the participants or their communications may experience failures. Astrong consensus avoids split-brain for the following examples:

A first example is a basic race between first cluster timer expiring andobtaining consensus to resume I/O operations locally and the plannedfailover workflow obtaining consensus as part of operation 624.

A second example includes both first and second clusters performing areboot after operation 618 (e.g., 2 master situations) but beforeoperation 624. In this case, both CG1 and CG2 will attempt to obtainconsensus and the first one will be granted the consensus.

A third example involves both clusters performing a reboot afteroperation 624 but before CG1 is set to read only state (e.g., another 2master situation where both clusters will go for consensus but sinceoperation 624 has already taken place, CG1 will not get the consensuseven if it is the first one to request for it).

FIG. 7 is a flow diagram illustrating a computer-implemented method 700of operations for an atomic test and set procedure of a planned failoverfeature in accordance with an embodiment of the present disclosure. Asnoted above, this atomic test and set procedure feature avoids a racecondition for control of serving I/O operations between CG1 and CG2.

Although the operations in the computer-implemented method 700 are shownin a particular order, the order of the actions can be modified. Thus,the illustrated embodiments can be performed in a different order, andsome operations may be performed in parallel. The numbering of theoperations presented is for the sake of clarity and is not intended toprescribe an order of operations in which the various operations mustoccur. Additionally, operations from the various flows may be utilizedin a variety of combinations.

The operations of computer-implemented method 700 may be executed by astorage controller, a storage virtual machine (e.g., SVM 511 a, SVM 511b), a mediator (e.g., mediator 120, mediator 220, mediator 360), amulti-site distributed storage system, a computer system, a machine, aserver, a web appliance, a centralized system, a distributed node, orany system, which includes processing logic (e.g., one or moreprocessors, a processing resource). The processing logic may includehardware (circuitry, dedicated logic, etc.), software (such as is run ona general purpose computer system or a dedicated machine or a device),or a combination of both.

In one embodiment, a multi-site distributed storage system includes afirst cluster having a primary copy of data in a consistency group(CG1). The consistency group of the first cluster is assigned a masterrole. A second cluster has a mirror copy of data of the primary copy inthe consistency group. The consistency group of the second cluster (CG2)is assigned a slave role.

At operation 710, a computer-implemented method includes starting anatomic test and set procedure given a role change operation (e.g.,operation 624 of FIG. 6) to change a role for CG2. At operation 712, theatomic test involves checking whether a relationship state between theprimary and mirrored copies is already synchronized in a sync state(e.g., a mirror copy is failover capable). If a relationship state issynchronized (e.g., in sync state), then the mirror copy (slave) will befailover capable. If the relationship is synchronized, then a setting tochange an owner of a consistency group to CG2 occurs at operation 714. Achange of ownership is stored as a database update with a mediator. Ifthe atomic test fails with relationship state not in sync state and thusa planned failover fails, then no change for an owner of the consistencygroup occurs at operation 715.

Atomic test-and-set is utilized to avoid any race between rollback timerexpiry and related processing from CG1 and operation 624 from CG2. In anormal case, the second cluster checks that the relationship is stillsynchronized and then in an atomic fashion changes the owner for this CGto CG2. This is sufficient to fail any subsequent attempt from CG1 toacquire consensus.

Upon success of atomic test and set, the computer-implemented methodincludes persisting the changed owner of a consistency group to CG2 atoperation 720. This persistence of the changed owner guaranteesnon-disruptive operations in the event of a failure resulting in acontroller reboot or a takeover from a partner node. At operation 722,the computer-implemented method includes for the first clusterconverting CG1 to read-only and converting the role of CG1 from a masterto a slave. At operation 724, the computer-implemented method includesre-establishing synchronization replication from CG2 (primary copy) toCG1 (mirrored copy).

FIG. 8 is a block diagram of a multi-site distributed storage system 800that performs a planned failover feature in accordance with anembodiment of the present disclosure. As noted above, this plannedfailover feature of the present design provides an order of operationssuch that a primary copy of data at a data center 810 continues to serveI/O operations until a mirror copy of the data at a data center 850 isready. This planned failover feature provides non-disruptiveness duringplanned failover from a primary copy of data to a second copy of thedata—in presence of various failures. The planned failover feature alsoavoids a split-brain situation by the way of a strong consensus (e.g.,strong consensus in a Paxos instance) based on having a primary copy ofa first data center, a mirror copy with a second data center, and amediator 880 at a third site.

In one embodiment, the distributed storage system 800 includes the datacenter 710 having a first cluster with a primary copy of data in aconsistency group (CG) 815. A consistency group may include a subset orall volumes of a storage node. The consistency group 815 includes volumeV1 of node 812 and volume V2 of node 814. Initially, CG 815 can beassigned a master role. The data center 850 includes a second clusterhaving a mirror copy of the data in the consistency group 855. Theconsistency group 855 may include a volume V3 of node 852 and volume V4of node 854. CG 855 can be initially assigned a slave role prior to aplanned failover.

The distributed storage system 800 having the first and second clustersreceives a planned failover start command 860 and this initializes astarting state of a planned failover (PFO) feature. The planned failovermay be implemented to provide non-disruptive operations even in thepresence of failures including but not limited to network disconnectionbetween data centers and a mediator, and even if an entire data centerbecomes non-functional. Next, prechecks are performed by the data center850 to determine whether a planned failover is incompatible with otheroperations. If so, incompatible operations are completed prior toproceeding with the planned failover. Then, a communication 891 is sentto the data center 810. In response, the data center 810 starts arollback timer. Expiration of this timer causes a fence to drop andallow I/O operations locally at data center 810. This rollback timerprovides non-disruptiveness from the consistency group 815 before a rolechange operation (e.g., role change operation 624) occurs.

Any failure that results in failing the planned failover operation, suchas a network connectivity issues or slowness leading to timeout issues,will prevent the role change operation. In that case, the rollback timerat the consistency group 815 will pre-empt the role change operation andallow I/O operations locally at CG 815 thereby guaranteeingnon-disruptiveness. This timer also enables making planned failoveroperation a time-bound operation by the way of setting the timer to auser defined value. If the operations leading to the role changeoperation take longer than the timeout, I/O commands will resume basedon the timer expiry.

Next, the data center 810 rejects I/O operations and drains inflightoperations to ensure that both primary and mirror copies of CG 815 andCG 855 have consistent matching content of data. A communication 892 isthen sent from data center 810 to data center 850 and this causesvolumes V3 and V4 of CG 855 to change from an initial read only state toa readable and writeable state. Also, the data center 850 converts CG855 from a slave role to a master role and sets a persistent fence toprevent new I/O operations from being processed by the data center 850until a role change operation (e.g., operation 624, point of no returnoperation) occurs. A filesystem persistent fence is used to implementthis persistent fence. Once activated, the fence is persistent andtherefore handles any failures including a controller reboot for acontroller of a cluster or data center. Also, as a part of thisoperation, the CG 815 initially having the master role releases aconsensus that the CG 815 previously had—carry forward from steadystate. Releasing the consensus from CG 815 allows the CG 855 to acquirea consensus from mediator 880 as part of a subsequent role changeoperation (e.g., operation 624, point of no return operation) based oncommunications 893 and 894.

The multi-site distributed storage system can notify a host of paths toCG 855 as being active and optimized and this will enable the host tostart sending I/O operations to the mirrored copy of CG 855. CG 855 cannotify a proxy module of a change from I/O operations for CG 855 beingforwarded to CG 815 and instead the I/O operations are processed locallyat CG 855. Each node (e.g., 812, 814, 852, 854) includes a proxy module(e.g., 813, 817, 857, 858) for these notifications.

Next, a role change operation occurs to change a role for CG 855 in anatomic test and set procedure, which is described and illustrated inFIG. 7. The atomic test involves checking whether a relationship isalready synchronized (e.g., primary and mirror copies are both failovercapable) and the setting to change owner of this consistency group to CG855 only occurs when atomic test determines that the relationship issynchronized. In a normal case, CG 855 checks that the relationship isstill synchronized and then in an atomic fashion changes the owner forthis CG from CG 815 to CG 855. Then, a bypass fence operation isperformed to allow CG 855 to locally serve I/O operations. A timingwindow 890 includes the reject I/O operations, drain inflightoperations, set volumes in CG 855 to read write, set persistent fencefor CG 855, set CG 855 from slave to master role, send notifications forproxy modules, perform role change for CG 755, and set the bypass fencefor CG 855. The persistent fence is used to avoid serving I/O operationsduring the timing window 890 when both primary data storage (e.g., CG815) and secondary data storage (e.g., CG 855) are attempting to have amaster role to serve I/O operations and this avoids a split-brainsituation.

A communication 895 is sent to CG 815 and this causes a master role tochange to a slave role for CG 815. CG 815 can notify a proxy module of achange from I/O operations being locally processed at CG 815 and insteadforwarding the I/O operations to CG 855 for processing. A communication896 is sent to CG 855 and then volumes of CG 855 are resynchronized tovolumes of CG 815.

Example Computer System

Embodiments of the present disclosure include various steps, which havebeen described above. The steps may be performed by hardware componentsor may be embodied in machine-executable instructions, which may be usedto cause a processing resource (e.g., a general-purpose orspecial-purpose processor) programmed with the instructions to performthe steps. Alternatively, depending upon the particular implementation,various steps may be performed by a combination of hardware, software,firmware and/or by human operators.

Embodiments of the present disclosure may be provided as a computerprogram product, which may include a non-transitory machine-readablestorage medium embodying thereon instructions, which may be used toprogram a computer (or other electronic devices) to perform a process.The machine-readable medium (or computer-readable medium) may include,but is not limited to, fixed (hard) drives, magnetic tape, floppydiskettes, optical disks, compact disc read-only memories (CD-ROMs), andmagneto-optical disks, semiconductor memories, such as ROMs, PROMs,random access memories (RAMs), programmable read-only memories (PROMs),erasable PROMs (EPROMs), electrically erasable PROMs (EEPROMs), flashmemory, magnetic or optical cards, or other type ofmedia/machine-readable medium suitable for storing electronicinstructions (e.g., computer programming code, such as software orfirmware).

Various methods described herein may be practiced by combining one ormore non-transitory machine-readable storage media containing the codeaccording to embodiments of the present disclosure with appropriatespecial purpose or standard computer hardware to execute the codecontained therein. An apparatus for practicing various embodiments ofthe present disclosure may involve one or more computers (e.g., physicaland/or virtual servers) (or one or more processors within a singlecomputer) and storage systems containing or having network access tocomputer program(s) coded in accordance with various methods describedherein, and the method steps associated with embodiments of the presentdisclosure may be accomplished by modules, routines, subroutines, orsubparts of a computer program product.

FIG. 9 is a block diagram that illustrates a computer system 900 inwhich or with which an embodiment of the present disclosure may beimplemented. Computer system 900 may be representative of all or aportion of the computing resources associated with a storage node (e.g.,storage node 136 a-n, storage node 146 a-n, storage node 236 a-n,storage node 246 a-n, nodes 311-312, nodes 321-322, storage node 400,nodes 812, 814, 852, 854), a mediator (e.g., mediator 120, mediator 220,mediator 360), or an administrative work station (e.g., computer system110, computer system 210). Notably, components of computer system 900described herein are meant only to exemplify various possibilities. Inno way should example computer system 900 limit the scope of the presentdisclosure. In the context of the present example, computer system 900includes a bus 902 or other communication mechanism for communicatinginformation, and a processing resource (e.g., processing logic, hardwareprocessor(s) 904) coupled with bus 902 for processing information.Hardware processor 904 may be, for example, a general purposemicroprocessor.

Computer system 900 also includes a main memory 906, such as a randomaccess memory (RAM) or other dynamic storage device, coupled to bus 902for storing information and instructions to be executed by processor904. Main memory 906 also may be used for storing temporary variables orother intermediate information during execution of instructions to beexecuted by processor 904. Such instructions, when stored innon-transitory storage media accessible to processor 904, rendercomputer system 900 into a special-purpose machine that is customized toperform the operations specified in the instructions.

Computer system 900 further includes a read only memory (ROM) 908 orother static storage device coupled to bus 902 for storing staticinformation and instructions for processor 904. A storage device 910,e.g., a magnetic disk, optical disk or flash disk (made of flash memorychips), is provided and coupled to bus 902 for storing information andinstructions.

Computer system 900 may be coupled via bus 902 to a display 912, e.g., acathode ray tube (CRT), Liquid Crystal Display (LCD), OrganicLight-Emitting Diode Display (OLED), Digital Light Processing Display(DLP) or the like, for displaying information to a computer user. Aninput device 914, including alphanumeric and other keys, is coupled tobus 902 for communicating information and command selections toprocessor 904. Another type of user input device is cursor control 916,such as a mouse, a trackball, a trackpad, or cursor direction keys forcommunicating direction information and command selections to processor904 and for controlling cursor movement on display 912. This inputdevice typically has two degrees of freedom in two axes, a first axis(e.g., x) and a second axis (e.g., y), that allows the device to specifypositions in a plane.

Removable storage media 940 can be any kind of external storage media,including, but not limited to, hard-drives, floppy drives, IOMEGA® ZipDrives, Compact Disc —Read Only Memory (CD-ROM), CompactDisc—Re-Writable (CD-RW), Digital Video Disk—Read Only Memory (DVD-ROM),USB flash drives and the like.

Computer system 900 may implement the techniques described herein usingcustomized hard-wired logic, one or more ASICs or FPGAs, firmware orprogram logic which in combination with the computer system causes orprograms computer system 900 to be a special-purpose machine. Accordingto one embodiment, the techniques herein are performed by computersystem 900 in response to processor 904 executing one or more sequencesof one or more instructions contained in main memory 906. Suchinstructions may be read into main memory 906 from another storagemedium, such as storage device 910. Execution of the sequences ofinstructions contained in main memory 906 causes processor 904 toperform the process steps described herein. In alternative embodiments,hard-wired circuitry may be used in place of or in combination withsoftware instructions.

The term “storage media” as used herein refers to any non-transitorymedia that store data or instructions that cause a machine to operationin a specific fashion. Such storage media may comprise non-volatilemedia or volatile media. Non-volatile media includes, for example,optical, magnetic or flash disks, such as storage device 910. Volatilemedia includes dynamic memory, such as main memory 906. Common forms ofstorage media include, for example, a flexible disk, a hard disk, asolid state drive, a magnetic tape, or any other magnetic data storagemedium, a CD-ROM, any other optical data storage medium, any physicalmedium with patterns of holes, a RAM, a PROM, and EPROM, a FLASH-EPROM,NVRAM, any other memory chip or cartridge.

Storage media is distinct from but may be used in conjunction withtransmission media. Transmission media participates in transferringinformation between storage media. For example, transmission mediaincludes coaxial cables, copper wire and fiber optics, including thewires that comprise bus 902. Transmission media can also take the formof acoustic or light waves, such as those generated during radio-waveand infra-red data communications.

Various forms of media may be involved in carrying one or more sequencesof one or more instructions to processor 904 for execution. For example,the instructions may initially be carried on a magnetic disk orsolid-state drive of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 900 canreceive the data on the telephone line and use an infra-red transmitterto convert the data to an infra-red signal. An infra-red detector canreceive the data carried in the infra-red signal and appropriatecircuitry can place the data on bus 902. Bus 902 carries the data tomain memory 906, from which processor 904 retrieves and executes theinstructions. The instructions received by main memory 906 mayoptionally be stored on storage device 910 either before or afterexecution by processor 904.

Computer system 900 also includes a communication interface 918 coupledto bus 902. Communication interface 918 provides a two-way datacommunication coupling to a network link 920 that is connected to alocal network 922. For example, communication interface 918 may be anintegrated services digital network (ISDN) card, cable modem, satellitemodem, or a modem to provide a data communication connection to acorresponding type of telephone line. As another example, communicationinterface 918 may be a local area network (LAN) card to provide a datacommunication connection to a compatible LAN. Wireless links may also beimplemented. In any such implementation, communication interface 918sends and receives electrical, electromagnetic or optical signals thatcarry digital data streams representing various types of information.

Network link 920 typically provides data communication through one ormore networks to other data devices. For example, network link 920 mayprovide a connection through local network 922 to a host computer 924 orto data equipment operated by an Internet Service Provider (ISP) 926.ISP 926 in turn provides data communication services through the worldwide packet data communication network now commonly referred to as the“Internet” 928. Local network 922 and Internet 928 both use electrical,electromagnetic or optical signals that carry digital data streams. Thesignals through the various networks and the signals on network link 920and through communication interface 918, which carry the digital data toand from computer system 900, are example forms of transmission media.

Computer system 900 can send messages and receive data, includingprogram code, through the network(s), network link 920 and communicationinterface 918. In the Internet example, a server 930 might transmit arequested code for an application program through Internet 928, ISP 926,local network 922 and communication interface 918. The received code maybe executed by processor 904 as it is received, or stored in storagedevice 910, or other non-volatile storage for later execution.

1. A computer-implemented method for a non-disruptive planned failoverperformed by one or more processors of a multi-site distributed storagesystem, the method comprising: initializing a starting state of aplanned failover (PFO) of the multi-site distributed storage system toprovide planned failover for serving input/output (I/O) operations froma first cluster having a primary copy of data to a second cluster havinga mirrored copy of the data; starting, with the first cluster, arollback timer for pre-empting a role change operation if the rollbacktimer expires prior to performing the role change operation to providenon-disruptiveness of control for serving input/output (I/O) operationswith the first cluster; setting a persistent fence to prevent newinput/output (I/O) operations from being processed by the multi-sitedistributed storage system; and performing the role change operation tochange a role for the second cluster to process I/O operations when therole change operation occurs prior to expiration of the rollback timer.2. The computer-implemented method of claim 1, wherein the first clusterhas the primary copy of the data in a consistency group that isinitially assigned a master role, wherein the second cluster has themirrored copy of the data in the consistency group that is initiallyassigned a slave role, wherein the planned failover is performed even ifmultiple failures occur.
 3. The computer-implemented method of claim 1,wherein the rollback timer provides non-disruptiveness for a consistencygroup before the role change operation is performed.
 4. Thecomputer-implemented method of claim 1, wherein expiration of therollback timer prior to the role change operation causes pre-emption ofthe role change operation and allows I/O operations to continue beingserved locally by the first cluster, wherein expiration of the rollbacktimer after the role change operation causes the I/O operations to beprocessed by the second cluster.
 5. The computer-implemented method ofclaim 1, wherein the rollback timer comprises a user defined value tocause the planned failover to be a time-bound operation by way ofsetting the rollback timer to a user defined value.
 6. Thecomputer-implemented method of claim 1, further comprising: changingvolumes of storage nodes of a consistency group of the second clusterfrom a read only state to a readable and writeable state, whereinperforming the role change operation comprises using an atomic test andset procedure to change a role for the second cluster with the atomictest and set procedure to check whether a relationship state between theprimary copy of the data and the mirrored copy of the data issynchronized and converting the consistency group of the second clusterfrom a slave role to a master role when the relationship state betweenthe primary copy of the data and the mirrored copy of the data issynchronized.
 7. The computer-implemented method of claim 1, furthercomprising releasing a consensus for a consistency group of the firstcluster when setting the persistent fence.
 8. The computer-implementedmethod of claim 1, further comprising: obtaining, with a mediator, a newconsensus for a consistency group of the second cluster; andpersistently cache the new consensus, wherein the caching of theconsensus provides non-disruptiveness in a double failure scenario whenthe second cluster performs a reboot and the connectivity to themediator fails in a transient or permanent manner.
 9. A multi-sitedistributed storage system comprising: a processing resource including ahardware processor; and a non-transitory computer-readable mediumcoupled to the processing resource, having stored therein instructions,which when executed by the processing resource cause the processingresource to: initialize a starting state of the planned failover (PFO)of the multi-site distributed storage system to provide planned failoverfrom a first cluster having a primary copy of data in a consistencygroup to a second cluster having a mirrored copy of the data, start arollback timer for pre-empting a role change operation if the rollbacktimer expires prior to performing the role change operation to providenon-disruptiveness of control for serving input/output (I/O) operationswith the first cluster, set a persistent fence to prevent newinput/output (I/O) operations from being processed by the multi-sitedistributed storage system, and perform a role change operation tochange a role for the second cluster to process I/O operations when therole change operation occurs prior to expiration of the rollback timer.10. The distributed storage system of claim 9, wherein the instructionswhen executed by the processing resource cause the processing resourceto start the rollback timer to provide non-disruptiveness for theconsistency group before the role change operation is performed even ifmultiple failures occur.
 11. The distributed storage system of claim 9,wherein expiration of the rollback timer prior to the role changeoperation causes pre-emption of the role change operation and allows I/Ooperations to continue being served locally by the first cluster,wherein expiration of the rollback timer after the role change operationcauses the I/O operations to be processed by the second cluster.
 12. Thedistributed storage system of claim 9, wherein the persistent fenceprevents I/O operations from being served during a timing window whenboth the first cluster and the second cluster are attempting to have amaster role to serve I/O operations and this avoids a split-brainsituation.
 13. The distributed storage system of claim 9, wherein theinstructions when executed by the processing resource cause theprocessing resource to: change volumes of storage nodes of theconsistency group of the second cluster from a read only state to areadable and writeable state; and convert the consistency group of thesecond cluster from a slave role to a master role.
 15. The distributedstorage system of claim 9, wherein the instructions when executed by theprocessing resource cause the processing resource to release a consensusfor the consistency group of the first cluster when setting thepersistent fence.
 16. The distributed storage system of claim 9, whereinthe instructions when executed by the processing resource cause theprocessing resource to: obtain a new consensus for the consistency groupof the second cluster; and persistently cache the new consensus with theconsistency group of the second cluster, wherein the caching of theconsensus provides non-disruptiveness in a double failure scenario wherethe second cluster performs a reboot and meanwhile the connectivity to amediator fails in a transient or permanent manner.
 17. A non-transitorycomputer-readable storage medium embodying a set of instructions, whichwhen executed by a processing resource of a multi-site distributedstorage system cause the processing resource to: initialize a startingstate of a planned failover (PFO) of the multi-site distributed storagesystem to provide planned failover for control of serving input/output(I/O) operations from a host with a first cluster having a primary copyof data to a second cluster having a mirrored copy of the data; andperform a role change operation using an atomic test and set procedureto change a role for the second cluster for control of servinginput/output (I/O) operations while avoiding a race between the firstand second clusters in attempting to obtain consensus for control ofserving input/output (I/O) operations from the host.
 18. Thenon-transitory computer-readable storage medium of claim 17, wherein theatomic test and set procedure comprises checking whether a relationshipstate between the primary copy of the data and the mirrored copy of thedata is synchronized.
 19. The non-transitory computer-readable storagemedium of claim 17, wherein the instructions when executed by theprocessing resource further cause the processing resource to set anowner of a consistency group of the data to be the second cluster when arelationship state is synchronized and this change in the owner of theconsistency group is sufficient to fail any subsequent attempt from thefirst cluster to obtain consensus, wherein no change occurs for theowner of the consistency group when the relationship state is notsynchronized.
 20. The non-transitory computer-readable storage medium ofclaim 17, wherein the instructions when executed by the processingresource further cause the processing resource to persist a changedowner of a consistency group to the second cluster upon success of theatomic test and set procedure.